1. Field of the Invention
The present invention relates to a method of transient analysis considering time steps and a device for implementing the method.
2. Description of the Related Art
Due to great improvement of computer hardware and refined transient analysis simulation software, considerable labor saving has been achieved in the field of circuit design which was conventionally performed only through experimental trial and error. A simulator of electric or electronic circuits has circuits comprising transistors, resistors, capacitors, inductors, and the like as a target of analysis, and traces behavior of circuit voltages and currents using a numerical analysis method such as the Newton method, logically based on Kirchhoff's and Ohm's laws.
Recently, SPICE2 (University of California Berkley, Memo No. ERL-M520, May 1975) has been well known as a transient analysis simulator. When SPICE2 analyzes a voltage changing with time, it follows the following procedure.
First, reference values .DELTA.t to maintain accuracy and .DELTA.v to advance a calculation point are set. Then a rate of change dv/dt in the voltage v.sub.n at an nth calculation point t.sub.n on a time axis is obtained. Based on this dv/dt, a next calculation point t.sub.n+1 is predicted linearly so that a voltage v.sub.n+1 at the next calculation point t.sub.n+1 satisfies v.sub.n+1 -v.sub.n =.DELTA.v. Calculation of v.sub.n+1 at this stage is performed roughly by a known approximation equation such as trapezoid method or Gear method. After the calculation point moves to t.sub.n+1, a non-linear circuit voltage equation is solved by the Newton method or the like, and v.sub.n+1 is obtained precisely. If t.sub.n+1 -t.sub.n &gt;.DELTA.t, calculation points are controlled by setting t.sub.n+1 =t.sub.n +.DELTA.t in order not to over-advance, thereby maintaining precision of calculation. By predicting a next calculation point based on .DELTA.v, it is possible to trace the voltage precisely at more calculation points when the change rate in voltage is high. Contrarily, it is also possible to shorten time necessary for calculation by advancing the calculation points to some degree when the change rate is low.
To trace changes in voltage, another method by considering voltage which is input to a circuit to be analyzed is also known. In this method, in conjunction with the above-mentioned .DELTA.v, a reference voltage .DELTA.v.sub.I for the input voltage is also provided. A new calculation point is set when the input voltage changes exactly by .DELTA.v.sub.I. When input voltage changes greatly, a comparatively big change in output voltage tends to follow. Therefore, this method contributes to accurate calculation of voltage. In Japanese Patent Laid-Open Publication Hei6-83897, a method to improve the conventional method of considering input voltage as well as output voltage is disclosed. This method is based on the fact that no calculation points need to be set when the input voltage changes by .DELTA.v.sub.I and the change rate remains constant. In this method, calculation points are set when the change rate in input voltage, and not a change in the input voltage, reaches a certain value. In this way, the number of calculation points is reduced and calculation time is shortened.
Regarding the transient analysis simulation, as described above, a plurality of proposals to shorten calculation time while maintaining calculation accuracy have been proposed. Methods to reduce errors in simulation are included in the proposals to shorten calculation time. For example, some proposals have been made to eliminate divergent circuit equation solutions.
However, other problems exist when SPICE2 is actually used. One problem is that simulations often forcibly quit halfway due to an error regarding a time interval (also called a time step) of calculation points. This error (hereafter, called "forced quit error") occurs upon prediction of the calculation point t.sub.n+1 based on the calculation point t.sub.n, if the time interval (t.sub.n+1 -t.sub.n) is remarkably different from the reference value .DELTA.t for keeping accuracy. Time parameters such as t.sub.n are usually defined as variables of floating decimal point. Therefore, a domain of the variable of this kind is decided so that the upper bound of the domain has several more digits and the lower bound has several less digits than a typical .DELTA.t. The domain thus decided is capable of being treated by a computer, and sometimes called a "dynamic range" of a computer. When the voltage changes rapidly, in other words, dv/dt grows very large, the time step (t.sub.n+1 -t.sub.n) becomes extremely small, and moves out of the lower bound of the dynamic range. On the other hand, even when dv/dt is not very large, setting .DELTA.t larger to shorten calculation time may result in the same phenomenon because the time step (t.sub.n+1 -t.sub.n) becomes too small relative to .DELTA.t.
In each case, elapsed simulation time is wasted, since the simulation was forcibly quit halfway. It is up to an operator's experience, to some degree, to decide how to change parameters to avoid errors. If .DELTA.t is set small so as to avoid error, simulations require a long time. Up to the present, forced quit errors lead to deterioration in development efficiency without an effective countermeasure. Japanese Patent Laid-Open Publication Hei6-83897 does not consider the dynamic range of a computer.